<!-- /* Description for file.
 * 通告-增加通告
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/notices
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    会兵2011年0706
 * @lastmodified  会兵2011年0706
 */-->

<?php
echo $html->css ( 'tab' );
echo $html->css ( 'style' );
echo $javascript->link('jquery-1.4.2');
echo $html->css('start/jquery-ui-1.8.2.custom');
echo $javascript->link('jquery-ui-1.8.2.custom.min');
echo $html->css ( 'jquery-validate/css/screen' );
echo $javascript->link ( 'jquery-validate/jquery.validate');
echo $javascript->link ( 'jquery-validate/additional-methods');
echo $javascript->link ( 'jquery-validate/localization/messages_cn');

?>

<script type="text/javascript">
//添加验证
$(document).ready(function() {
	$.validator.setDefaults({       
		 submitHandler: function(form) {    
		  form.submit();    
		}       
	});   
			
	$("#NoticeAddForm").validate({
		rules: {
		"data[Notice][title]" :{
			required: true,stringMinLength:0,stringMaxLength:100
			},//主题
		"data[Notice][context]"  :{
			required: false
			}//内容
		},
		messages:{},
		focusInvalid:false,
		onkeyup:false,
		errorPlacement:function(error, element){error.appendTo(element.parent());}
	});
});
//验证结束
</script>
 
 <script type="text/javascript">
	$(function()
	{
		$("#close").click(function(){		
			window.close();							
		});
	});
</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Personal Office');//一级目录
										   echo '>';echo __('Notice Fence');//二级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Add Notice',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
 
<div class="tabflex">
<?php echo $form->create('Notice',array('action'=>'add','type'=> 'post'));?>
<fieldset>
	<legend><?php  __('Add Notice');?></legend>

<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left;font-size:12px;">
	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Creator');?>:</td>
		<td><?php 
				echo $form->input('creater',array('label'=>false,'value'=>$creater,'disabled'=>"disabled",'class' => 'TextBoxH'));
			?>
		</td>
		<td width="50"></td>
		<td width="100"><?php __('Create_Time');?>:</td>
		<td>
			<?php echo $form->text('pubdate',array('label'=>false,'value'=>$pubdate,'disabled'=>"disabled",'class' => 'TextBoxH'));
			?>
		</td>
	</tr>
	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Subject');?>:<font color="red">*</font></td>
		<td colspan="4"><?php echo $form->input('title',array('label'=>false,'class' => 'TextBoxH'));
			?>
		</td>
	</tr>
	<tr>
		<td width="50"></td>
		<td width="100"><?php __('Field_Value');?>:</td>
		<td colspan="4">
			<?php echo $form->textarea('context',array('label'=>false,'class' => 'areaStyle','size'=>4));
			?>
		</td>
	</tr>
	
	
	
	
	</table>
	
</fieldset>
	
	<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
		<td width="100"><?php echo $form->button('确定',array('type'=>'submit','class'=>'btn2'));?>  <!-- __('reset', true)取消-->
		<td width="100"><?php echo $form->button('关闭',array('class'=>'btn2','id'=>'close'));?>  <!-- __('reset', true)取消-->
		</td>
	</tr>
</table>
<?php echo $form->end();?>
</div>



